package demo;

import java.util.TreeMap;

public class Demo09 {
    public static void main(String[] args) {
        /**
         * Java 中 TreeMap 内部数据结构是
         * 红黑树, 自平衡二叉搜索排序树
         * 根据key比较大小
         */
        TreeMap<Integer,String> tree = new TreeMap<>();
        tree.put(680,"Tom");
        tree.put(580,"Tom");
        tree.put(480,"Tom");//发生右旋转
    }
}
